(function () {
    let qr = getUrlParams(location.href)
    console.log(qr.productid);
    $.ajax({ url: `http://chst.vip:1234/api/getmoneyctrlproduct?productid=${qr.productid}` })
        .then(res => {
            let newData = [...res.result]
            console.log(newData);
            let html = ''
            let page = ''
            newData.forEach(item => {
            let regExp = /(?<=imgurl=)[^'"]*/;
            let r = item.productImg2.match(regExp);

                html = `
            <div class="title">
                <h4>${item.productName}</h4>
            </div>
            <div class="other">
                <span class="mall fl">${item.productFrom} | ${item.productTime}</span>
                <i>${item.productTips}</i>
            </div>
            <div class="container">
                <p>
                <img src=${r[0]} height="200" alt="">
                      ${item.productInfo2}
                      ${item.productInfo1}
                </p>
            </div>
            <div class="bigimg">
            <img src=${r[0]} height="350" alt="">

            </div>
            <div class="city">
                ${item.productCity}
            </div>
            `
                page += `
            ${item.productComment}
            `
            })
            $('.lisIn').html(html)
            $('.comment').html(page)
        })
})()